﻿using AmiDraw.Editor.Component;
using AmiDraw.Lib.Models;
using System;
using System.Diagnostics;
using System.Globalization;
using System.Windows.Data;

namespace AmiDraw.Editor.Converters
{
    public class ElementGetNameStrConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if(value == null)
            {
                return string.Empty;

            }
            Debug.WriteLine((value as MultiplotElemtentBase).Name.ToString());
            return (value as MultiplotElemtentBase).Name.ToString();
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return null;
        }
    }
}
